package com.wxg.demo;

import javax.swing.JButton;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.nimbus.NimbusLookAndFeel;

import com.alee.extended.panel.GroupPanel;
import com.alee.extended.window.TestFrame;
import com.alee.laf.WebLookAndFeel;
import com.alee.laf.button.WebButton;

/**
 * [How-to-use-WebLaF](https://github.com/mgarin/weblaf/wiki/How-to-use-WebLaF)
 * 
 * NimbusLookAndFeel
 * 
 */
public class TestApp2 {
	public static void main ( final String[] args )
    {
        SwingUtilities.invokeLater ( new Runnable ()
        {
            public void run ()
            {
                try
                {
                    UIManager.setLookAndFeel ( NimbusLookAndFeel.class.getCanonicalName () );
                    WebLookAndFeel.initializeManagers ();

                    final JButton jButton = new JButton ( "Nimbus button" );
                    final WebButton webButton = new WebButton ( "WebLaF button" );
                    TestFrame.show ( new GroupPanel ( 5, jButton, webButton ), 5 );
                }
                catch ( final ClassNotFoundException e )
                {
                    e.printStackTrace ();
                }
                catch ( final InstantiationException e )
                {
                    e.printStackTrace ();
                }
                catch ( final IllegalAccessException e )
                {
                    e.printStackTrace ();
                }
                catch ( final UnsupportedLookAndFeelException e )
                {
                    e.printStackTrace ();
                }
            }
        } );
    }
}
